package org.glow.changgou.user.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.glow.changgou.user.pojo.User;

/****
 * @Author:admin
 * @Description:User的Dao
 * @Date 2022/10/02 20:14:11
 *****/
@Mapper
public interface UserMapper extends BaseMapper<User> {
    /***
     * 增加用户积分
     * @param username
     * @param pint
     * @return
     */
    @Update("UPDATE tb_user SET points=points+#{point} WHERE  username=#{username}")
    int addUserPoints(@Param("username") String username, @Param("point") Integer pint);
}
